import requests

# 简单 GET 请求
response = requests.get('https://api.github.com')
print(response.status_code)
print(response.text)

# 带参数的 GET 请求
params = {'key1': 'value1', 'key2': 'value2'}
response = requests.get('https://httpbin.org/get', params=params)
print(response.url)  # 查看实际请求的URL